package org.jeecg.modules.sistersophie.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.hibernate.annotations.Parameter;
import org.jeecg.modules.sistersophie.entity.StudentInfo;
import org.jeecg.modules.sistersophie.mapper.StudentInfoMapper;
import org.jeecg.modules.sistersophie.service.IStudentInfoService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: t_student_info
 * @Author: jeecg-boot
 * @Date:   2021-05-23
 * @Version: V1.0
 */
@Service
public class StudentInfoServiceImpl extends ServiceImpl<StudentInfoMapper, StudentInfo> implements IStudentInfoService {
    @Resource
    private StudentInfoMapper studentInfoMapper;

    public List<StudentInfo> selectStudentList(Wrapper<StudentInfo> queryWrapper){
        return studentInfoMapper.selectList(queryWrapper);
    }

    public List<StudentInfo> selectByNameNotIn(String firstName,String lastName, Integer notId){

        return studentInfoMapper.selectByNameNotIn(firstName,lastName,notId);
    }


    public List<StudentInfo> selectByChineseNameNotIn(String chineseName, Integer notId){
        return studentInfoMapper.selectByChineseNameNotIn(chineseName,notId);
    }

    @Override
    public List<StudentInfo> selectByEmailNotIn(String email, Integer notId) {
        return studentInfoMapper.selectByEmailNotIn(email,notId);
    }

    @Override
    public List<StudentInfo> selectByPhoneNotIn(String phone, Integer notId) {
        return studentInfoMapper.selectByPhoneNotIn(phone,notId);
    }

    public IPage<StudentInfo> selectStudentInfoAndNotInCourse(IPage<StudentInfo> page, @Param("searchVo") StudentInfo searchVO){
        return studentInfoMapper.selectStudentInfoAndNotInCourse(page,searchVO);
    }
}
